<!DOCTYPE html>
<#assign dicSelect=JspTaglibs["http://www.casic304.cn/dicSelect"] />
<#assign secSelect=JspTaglibs["http://www.casic304.cn/secSelect"] />
<#assign fillDept=JspTaglibs["http://www.casic304.cn/fillDept"] />
<html>
<head>
    <meta charset="utf-8">
    <title>DPA基本信息</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
          content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link rel="stylesheet" href="${ctx}/layui/css/layui.css" media="all"/>
    <link rel="stylesheet" href="${ctx}/qbdmsStatic/iconfont/iconfont.css"/>
    <link rel="stylesheet" href="${ctx}/qbdmsStatic/style/forms/currencyCss.css">
    <link rel="stylesheet" href="${ctx}/qbdmsStatic/style/qbdms.css">
    <script type="text/javascript">
        var __ctx = "${ctx}";
    </script>
    <style>
        .qbdms-TBinformation{margin-left: 0;font-size: 15px}
        .treeFormPreview{
            bottom: 42px;
        }
    </style>
</head>
<body class="listBody">

<div class="qbdms-bodyDiv" >
    <div class="qbdms-backDiv">
        <div class="layui-table-view-body" style="padding: 0 24px 24px;">
            <div class="qbdms-formTitle" style="border-bottom: 1px solid #E5F0FF">DPA信息 <i  class="qbdms-returnOn closeWindow">返回</i></div>
            <form class="layui-form treeFormPreview"  requrl="${ctx}/qbdms/wQbdDpaInfo/get"  lay-filter="wQbdDpaInfoDataForm" >



                <@fillDept.dept css="dragInfo temSpace" id="tbxx"/>

                <div class="layui-row">
                    <div class="" style="display: none;">
                        <label class="layui-form-label qbdms-label" title="主键">主键</label>
                        <div class="layui-input-block qbdms-input">
                            <input type="text" name="id"  placeholder="请输入" fieldname="id"
                                   autocomplete="off" class="layui-input" maxlength="50">
                        </div>
                    </div>

                    <div style="width: 65%">
                        <label class="layui-form-label qbdms-label" title="元器件名称">元器件名称<span style="color: red;">*</span></label>
                        <div class="layui-input-block qbdms-input">
                            <input type="text" name="componentsName"  placeholder="请输入" lay-verify="required" lay-reqtext="元器件名称是必填项"
                                   autocomplete="off" class="layui-input" maxlength="50" fieldname="componentsName">
                        </div>
                    </div>
                    <div style="width: 45%">
                        <label class="layui-form-label qbdms-label" title="密级">密级<span style="color: red;">*</span></label>
                        <div class="layui-input-block qbdms-input">
                                <@secSelect.sec_select required=true data_src=1 name="secret"/>
                        </div>
                    </div>
                    <div style="width: 65%">
                        <label class="layui-form-label qbdms-label" title="DPA分析报告编号">DPA分析报告编号<span style="color: red;">*</span></label>
                        <div class="layui-input-block qbdms-input">
                            <input type="text" name="dpaAnalysisReportNo" placeholder="请输入"
                                   autocomplete="off" class="layui-input  textInput" lay-verify="required" lay-reqtext="DPA分析报告编号是必填项"
                                   maxlength="50" fieldname="dpaAnalysisReportNo">
                        </div>
                    </div>

                    <div style="width: 65%">
                        <label class="layui-form-label qbdms-label" title="DPA分析时间">DPA分析时间<span style="color: red;">*</span></label>
                        <div class="layui-input-block qbdms-input">
                            <input type="text" name="dpaAnalysisTime" readonly placeholder="请输入" lay-reqtext="DPA分析时间是必填项"
                                   autocomplete="off" class="layui-input dateTimeFiled textInput time-init" lay-verify="required"  maxlength="50" fieldname="dpaAnalysisTime">
                        </div>
                    </div>


                    <div style="width: 65%">
                        <label class="layui-form-label qbdms-label" title="元器件型号规格">元器件型号规格<span style="color: red;">*</span></label>
                        <div class="layui-input-block qbdms-input">
                            <input type="text" name="componentModelSpec"  placeholder="请输入"
                                   autocomplete="off" class="layui-input" lay-verify="required" lay-reqtext="元器件型号规格是必填项"
                                   maxlength="50" fieldname="componentModelSpec">
                        </div>
                    </div>
                    <div style="width: 65%">
                        <label class="layui-form-label qbdms-label" title="元器件生产批号">元器件生产批号<span style="color: red;">*</span></label>
                        <div class="layui-input-block qbdms-input">
                            <input type="text" name="componentProductionNo"  placeholder="请输入"
                                   autocomplete="off" class="layui-input" lay-verify="required" lay-reqtext="元器件生产批号是必填项"
                                   maxlength="50" fieldname="componentProductionNo">
                        </div>
                    </div>
                    <div style="width: 65%">
                        <label class="layui-form-label qbdms-label" title="生产单位">生产单位<span style="color: red;">*</span></label>
                        <div class="layui-input-block qbdms-input">
                            <input type="text" name="productionUnit"  placeholder="请输入"
                                   autocomplete="off" class="layui-input" lay-verify="required" lay-reqtext="生产单位是必填项"
                                   maxlength="50" fieldname="productionUnit">
                        </div>
                    </div>
                    <div style="width: 45%">
                        <label class="layui-form-label qbdms-label" title="质量等级">质量等级<span style="color: red;">*</span></label>
                        <div class="layui-input-block qbdms-input">
                            <@dicSelect.dic name="qualityLevel" verify="required" reqtext="质量等级是必填项" nodeKey="dpazldj" />
                        </div>
                    </div>

                    <div style="width: 65%">
                        <label class="layui-form-label qbdms-label" title="委托单位">委托单位<span style="color: red;">*</span></label>
                        <div class="layui-input-block qbdms-input">
                            <input type="text" name="requester"  placeholder="请输入"
                                   autocomplete="off" class="layui-input" lay-verify="required" lay-reqtext="委托单位是必填项"
                                   maxlength="50" fieldname="requester">
                        </div>
                    </div>

                    <div style="width: 65%">
                        <label class="layui-form-label qbdms-label" title="DPA试验单位">DPA试验单位<span style="color: red;">*</span></label>
                        <div class="layui-input-block qbdms-input">
                            <input type="text" name="dpaTestUnit"  placeholder="请输入"
                                   autocomplete="off" class="layui-input" lay-verify="required" lay-reqtext="DPA试验单位是必填项"
                                   maxlength="50" fieldname="dpaTestUnit">
                        </div>
                    </div>

                    <div style="width: 65%">
                        <label class="layui-form-label qbdms-label" title="执行标准">执行标准<span style="color: red;">*</span></label>
                        <div class="layui-input-block qbdms-input">
                            <input type="text" name="execuStandard"  placeholder="请输入"
                                   autocomplete="off" class="layui-input" lay-verify="required" lay-reqtext="执行标准是必填项"
                                   maxlength="50" fieldname="execuStandard">
                        </div>
                    </div>

                    <div style="width: 65%">
                        <label class="layui-form-label qbdms-label" title="实际抽样数量">实际抽样数量<span style="color: red;">*</span></label>
                        <div class="layui-input-block qbdms-input">
                            <input type="text" name="actualNumOfSamples"  placeholder="请输入"
                                   autocomplete="off" class="layui-input" lay-verify="required|num" lay-reqtext="实际抽样数量是必填项"
                                   maxlength="50" fieldname="actualNumOfSamples">
                        </div>
                    </div>

                    <div style="width: 45%">
                        <label class="layui-form-label qbdms-label" title="DPA试验结论">DPA试验结论<span style="color: red;">*</span></label>
                        <div class="layui-input-block qbdms-input">
                            <@dicSelect.dic name="dpaTestConclusion" reqtext="DPA试验结论是必填项" verify="required" nodeKey="dpasyjl" />
                        </div>
                    </div>

                    <div style="width: 65%">
                        <label class="layui-form-label qbdms-label" title="不合格项目">不合格项目<span style="color: red;">*</span></label>
                        <div class="layui-input-block qbdms-input">
                            <textarea name="unqualifiedItems"  placeholder="请输入"  lay-reqtext="不合格项目是必填项"
                                      autocomplete="off" class="layui-textarea  textInput"  lay-verify="required"
                                      maxlength="500" fieldname="unqualifiedItems"></textarea>
                        </div>
                    </div>

                </div>

                <div class="layui-form-item" style="margin-top: 48px">
                    <p style="text-align: left;margin-left: 145px;">
                    <span id="hideAndShow" style="">
                        <a lay-submit lay-filter="wQbdDpaInfo" class="layui-btn btn-n privateSubmit qbdms-oneBtn"
                           requrl="${ctx}/qbdms/wQbdDpaInfo/save">提交</a>
                    </span>
                        <button type="reset" id="closeWindow" style="margin-left: 10px;"
                                class="layui-btn layui-btn-sm btn-save closeWindow qbdms-oneBtnLine">取消
                        </button>
                    </p>
                </div>

            </form>
        </div>
    </div>
</div>


<script src="${ctx}/qbdmsStatic/public/configFile.js"></script>
<script src="${ctx}/layui/layui.js"></script>

<script>
    layui.config({
        base: serverPath.qbdmsPath + staticPath.qbdmsPath //静态资源所在路径
    }).extend({
        index: 'lib/index' //主入口模块
    }).use(['index', 'common', 'laydate', 'jquery','publicMethods','propsHandle','qbdmsForm'], function () {
        var laydate = layui.laydate;
        var $ = layui.jquery;
        var dateTimeFiledLen = $(".dateTimeFiled");
        var publicMethods = layui.publicMethods;
        var  form = layui.qbdmsForm;
        for (var i = 0; i < dateTimeFiledLen.length; i++) {
            laydate.render({
                elem: dateTimeFiledLen[i] //指定元素
                , type: 'date'
                , trigger: 'click'
                ,max:new Date().valueOf()
            });
        }
        //关闭当前页面
        $(".closeWindow").click(function () {
            window.location.href = '${ctx}/qbdms/wQbdDpaInfo/view/list';
        });

        form.verify({
            num: function (value,item) {
                if (value && !new RegExp(/^\d+(\.\d+)?$/).test(value)) {
                    return  common.verifyTitleAdd(item)+'只允许输入数字且不能为负数';
                }
            }
        });

        var common = layui.common;
        var propsHandle = layui.propsHandle;
        var defProps = {
                //viewMould: 'form/formDef/view/formDesign/moulds/', // 组件模块 存放文件 *****
                viewMould: 'moulds/', // 组件模块 存放文件 *****
                selectorBtn: '.selectorBtn'
            },
            temQuery = new propsHandle();  // 实例化模板功能部分
        temQuery.initTem({
            selectorBtn: defProps.selectorBtn,
            selectorTemPath: setter.views + defProps.viewMould
        });
        var index = parent.layer.getFrameIndex(window.name);
        common.updateForm({
            name: 'wQbdDpaInfoDataForm',
            idValue: "${id}",
            primary: "id",
            updateCallback: function (data) {
                if (common.filterRecord(data)) {
                    if ($(".privateSubmit")) {
                        $(".privateSubmit").attr("disabled", false).css("pointer-events", "auto");
                    }
                    layer.alert(publicMethods.confirmStyle(data.msg),{title: false,skin: 'confirm-class'}, function (index) {
                        layer.close(index);
                        window.location.href ='${ctx}/qbdms/wQbdDpaInfo/view/list';
                    });
                } else {
                    layer.alert(publicMethods.confirmStyle(data.msg),{title: false,skin: 'confirm-class'});
                }
                return false;
            }
            ,getCallback:function(data){
                $("#tbxx").html("<span class='qbdms-TBinformation'>填报信息:</span>" +
                    "<span class='qbdms-TBinformationText'>【"+data.data.filldept+"   | "+data.data.fillman+"  | "+data.data.filldate+"】</span>");

            }
        });
    });
</script>
</body>
</html>